package utils

import "github.com/gin-gonic/gin"

func Success(data interface{}) interface{} {

	return gin.H{
		"code":0,
		"data":data,
		"msg":"success",
	}
}

func Fail(err error) interface{}{
	return gin.H{
		"code":-1,
		"data":nil,
		"msg":err.Error(),
	}
}
